using AutoMapper;
using ChikovMF.Application.Common.Mappings;
using ChikovMF.Application.Features.Projects.Shared;
using ChikovMF.Entities;

namespace ChikovMF.Application.Features.Projects.EditProject
{
    public class EditProjectModel : ProjectModel, IMapWith<Project>
    {
        public new void Mapping(Profile profile)
        {
            profile.CreateMap<Project, EditProjectModel>()
                .ForMember(project => project.Tags,
                    opt => opt.MapFrom(model => model.TagLinks))
                .ForMember(project => project.Links,
                    opt => opt.MapFrom(model => model.Links));
        }
    }
}